<!-- 此tpl如使用script标签渲染，请遵循layui.laytpl语法，此页面，支持PHP语法-->

<script type="text/html" id="barDemo">

    {foreach name="right_buttons" key="key" item="vo"}
        {{#  if(d.status == '待审核'){ }}
        <a class="{:getBtnClassTpl($vo.class,$vo.title)} text_btn_delete" lay-event="{$vo.json}" >审核</a>
        {{#  } else { }}
        <a class="{:getBtnClassTpl($vo.class,$vo.title)}" lay-event="{$vo.json}">{$vo.title}</a>
        {{#  } }}
    {/foreach}

</script>

<input type="hidden" id="update_url" value="{:url('update')}"/>
<!-- 开关状态栏 -->
{foreach name="switch_tool" item="vo"}
    <script type="text/html" id="{$vo.name}">
        <input type="checkbox" name="{$vo.name}" value="{{d.{$vo.pk}}}" lay-filter="status" lay-skin="switch" lay-val="{$vo.val}" lay-text="{$vo.text}" {{ d.{$vo.name}== {$vo.checked} ? 'checked' : '' }}>
    </script>
{/foreach}

<!-- 排序Bar -->
{foreach name="sort_tool" item="vo"}
    <script type="text/html" id="sort_{$vo.name}">
        <input type="text" data-key="{$vo.name}" data-id="{{d.{$vo.pk}}}" data-url="{$vo.url}" value="{{d.{$vo.name}}}" class="layui-input x-sort tableInput"/>
    </script>
{/foreach}

<script id="_takeUserTpl" type="text/html">
    {{#  if(d.take){ }}
    {{d.take.nickname}} - {{d.take.code}} - {{d.take.mobile}}
    {{#  } else { }}
    -
    {{#  } }}
</script>
<script id="_userTpl" type="text/html">
    {{#  if(d.user){ }}
    {{d.user.nickname}} - {{d.user.code}} - {{d.user.mobile}}
    {{#  } else { }}
    -
    {{#  } }}
</script>

<script id="imagesTpl" type="text/html">
    {{#  if(d.images){ }}
    <a href="javascript:;" class="openShowImg" data-value="{{d.images}}">点击查看</a>
    {{#  } else { }}
    -
    {{#  } }}
</script>

<script id="iconTpl" type="text/html">
    {{#  if(d.icon){ }}
    <a href="javascript:;" class="openShowImg" data-value="{{d.icon}}">点击查看</a>
    {{#  } else { }}
    -
    {{#  } }}
</script>

<script id="refundTpl" type="text/html">
    {{#  if(d.status == 1){ }}
    待审核
    {{#  }else if(d.status == 2){ }}
    同意退款
    {{#  }else if(d.status == 3){ }}
    待寄回
    {{#  }else if(d.status == 4){ }}
    拒绝退款
    {{#  } else { }}
    退款成功
    {{#  } }}
</script>
<script id="editorTpl" type="text/html">
    <a href="javascript:;" class="openEditor" data-value="{{d.content}}">点击预览</a>
</script>

<script id="videoTpl" type="text/html">
    {{#  if(d.video){ }}
    <a href="javascript:;" class="openVideo" data-value="{{d.video}}" style="color: #1890ff">点击预览</a>
    {{#  } else { }}
    -
    {{#  } }}
</script>